﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Big2.CardsLib;
using Big2.Big2Game;

namespace WinFormTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            
            Card a = new Card(CardRank.Two, CardSuit.Hearts);
            Card b = new Card(CardRank.Three, CardSuit.Hearts);
            Card c = new Card(CardRank.Four, CardSuit.Clubs);
            Card d = new Card(CardRank.Ace, CardSuit.Diamonds);
            Card e = new Card(CardRank.Five, CardSuit.Spades);
            
            /*
            Card a = new Card(CardRank.Ten, CardSuit.Hearts);
            Card b = new Card(CardRank.Queen, CardSuit.Hearts);
            Card c = new Card(CardRank.Ace, CardSuit.Clubs);
            Card d = new Card(CardRank.Jack, CardSuit.Diamonds);
            Card e = new Card(CardRank.King, CardSuit.Spades);
            */
            List<Card> test = new List<Card>();

            test.Add(a);
            test.Add(b);
            test.Add(c);
            test.Add(d);
            test.Add(e);

            test = CardHelper.SortCards(test, true);

            Play test1 = new Play(test, "Yachao", false);

            textBox.Text = test1.ThePlayType.ToString();
            
            

            /*

            Deck newDeck = new Deck();
            newDeck.shuffleDeck();

            List<Card> oldHand = new List<Card>();
            List<Card> newHand = new List<Card>();

            for (int i = 0; i < 51; i++)
            {
                oldHand.Add(newDeck.getNextCard());
                textBox.Text += oldHand.ElementAt(i).ToString() + "\r\n";
            }


            newHand = CardHelper.SortCards(oldHand, true);

            for (int i = 0; i < 51; i++)
            {
                textBox1.Text += newHand.ElementAt(i).ToString() + "\r\n";
            }

            label1.Text = newHand.ElementAt(50).Value.ToString();
            */





            // int i = 0, j = 0;

            /*
            for (i = 0; i < 52; i++)
            {
                textBox.AppendText(i + " " + newDeck.getNextCard().ToString() + "\r\n");
            }
            */

            //Play pair = new Play();
            //bool test = pair.IsValidPlay(PlayType.Pair);
            //textBox.Text = test.ToString();

        }
    }
}
